﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZhiKeDuoServer.BLL
{
   public class Base<T> where T : class, new()
    {

        public bool Add(T model)
        {
            return new DAL.Base<T>().Add(model);
        }



        public bool Delete(int Id)
        {
            return new DAL.Base<T>().Delete(Id);
        }
        public bool DeleteList(int[] Id)
        {
             return new DAL.Base<T>().DeleteList(Id);
        }

        public bool DeleteList(string IDlist)
        {

            return new DAL.Base<T>().DeleteList(IDlist);

        }

        public bool Exists(int Id)
        {
            return new DAL.Base<T>().Exists(Id);

        }




        public T GetModel(int Id)
        {
            return new DAL.Base<T>().GetModel(Id);
        }

        public int GetRecordCount(string strWhere)
        {
            return new DAL.Base<T>().GetRecordCount(strWhere);
        }

        public bool Update(T model)
        {
            return new DAL.Base<T>().Update(model);
        }
        public int GetMaxId()
        {
            return new DAL.Base<T>().GetMaxId();
        }
        public List<T> GetList(string strWhere)
        {
            return new DAL.Base<T>().GetList(strWhere);
        }

        public List<T> GetListByPage(string strWhere, string orderby, int pageSize, int startIndex)
        {
            return new DAL.Base<T>().GetListByPage(strWhere, orderby, pageSize, startIndex);
        }
    }
}
